package fr.umlv.m2.jee.spij.service.project;

import fr.umlv.m2.jee.spij.service.ldap.authentification.DisplayActor;
import org.springframework.binding.message.MessageContext;

import java.util.List;

/**
 * @author thomas magny
 */
public interface IDisplayProjectService {

    /**
     * @return
     */
    public List<DisplayProject> getAllDisplayProject(long unitId, MessageContext context);

    /**
     * Returns all the Projects given for an user.
     *
     * @param unitId the unit foreign key
     *
     * @return a list of DTO that contains the displayed data
     */
    public List<DisplayProject> getAllDisplayProjectPerUser(final long unitId, DisplayActor currentUser, MessageContext context);


    /**
     * @param id
     *
     * @return
     */
    public DisplayProject getProjectById(long id, MessageContext context);

    /**
     * @param project
     * @param unitId
     * @param context
     *
     * @return
     */
    public boolean createProject(DisplayProject project, long unitId, MessageContext context);

    /**
     * @param modifiedProject
     * @param context
     *
     * @return
     */
    public boolean updateProjectById(DisplayProject modifiedProject, MessageContext context);

    /**
     * @param id
     *
     * @return
     */
    public boolean deleteProjectById(long id, MessageContext context);
}
